Skip to content

fix: multiple issue fixes #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 30, 2020
Merged

fix: multiple issue fixes #61

merged 2 commits into from
Jul 30, 2020

Conversation

nonara
Copy link
Collaborator

@nonara nonara commented Jul 29, 2020

- Allow more than one path routing (fixes #60)
- Remove implicit extensions from output (fixes #24)
- Properly implemented isTypeOnly (fixes #48)
- Corrected errors in tests due to TS changing logic for type only star exports
- Bonus: Made package zero-dependency
@@ -96,17 +116,6 @@ const transformer = (_: ts.Program) => (context: ts.TransformationContext) => (
node.arguments.length === 1;

function visit(node: ts.Node): ts.VisitResult<ts.Node> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note on TS changes regarding type only exports

It seems that types only export behaviour has changed in TypeScript. For one, they added isTypeOnly, but they've also changed the standard behaviour of export * from 'module' and import 'module'

Even if module has only type exports, this line will still get compiled into the final result. This was causing the tests to fail, by default, after cloning the package. In order to match the prescribed TS behaviour , we've added the isTypeOnly param where needed as well as removed the following conditional.

In short, this means the TS compiler has taken over this logic.

@@ -1,5 +1,7 @@
import sum = require("@utils/sum");
export { sum } from "@utils";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows testing for secondary path routing

@danielpza
Copy link
Member

That's great @nonara , I'll definitely take my time in the evening to proper review it and test it.

Copy link
Member

@danielpza danielpza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, great job :D!

@danielpza danielpza changed the title Multiple Issue Fixes fix: multiple issue fixes Jul 30, 2020
@danielpza
Copy link
Member

@all-contributors add @nonara for bug, test, and code

@nonara
Copy link
Collaborator Author

nonara commented Jul 30, 2020

Thanks. 😄

@allcontributors
Copy link
Contributor

@danielpza

I've put up a pull request to add @nonara! 🎉

@danielpza danielpza merged commit a4e2916 into LeDDGroup:master Jul 30, 2020
@nonara
Copy link
Collaborator Author

nonara commented Jul 30, 2020

Whoops had the wrong issue number on one. Tagged an already closed issue

Path extensions also fixes #59

@danielpza
Copy link
Member

The fix is up in v1.1.15 🎉, many thanks for the amazing contribution @nonara!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants